-
-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Traack remove local storage code #138
Conversation
avenmia
commented
Jul 24, 2023
•
edited
Loading
edited
- Removes the local storage checks
- Removes the XID column and uses the user ID instead
- The polis survey only renders when the user ID is returned from the database
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good - I just have one small question!
document.body.removeChild(script); | ||
}; | ||
}, []); | ||
if (userID === "" || userID === undefined) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it possible for this page to load if the user hasn't logged in yet?
If yes, then I propose that if we detect that the userID isn't in the session that we redirect the user back to the home page instead of just saying Loading Surveys. What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe we want to redirect the user back to the home page if they're not logged in for all pages, but I'll add that in a separate PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good. Ship it!